package test.src.awt_swing;

import java.awt.*;

public class ScrollPanelDemo {
    public static void main(String[] args) {
        Frame frame = new Frame("这里演示ScrollPanel");
        ScrollPane scrollPane = new ScrollPane(ScrollPane.SCROLLBARS_ALWAYS);
        Button button = new Button("这是一个测试按钮");
        scrollPane.add(button);
        TextField textField = new TextField("这是一个测试文本");
        scrollPane.add(textField);
        frame.add(scrollPane);



        frame.setBounds(100, 100, 300, 300);
        frame.setVisible(true);
    }
}
